﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Fachada;
using ObjetoNegocio;

namespace CIRS.Algoritmos
{
    /// <summary>
    /// Interaction logic for UcListarAlgoritmo.xaml
    /// </summary>
    public partial class UcListarAlgoritmo : UserControl
    {
        public UcListarAlgoritmo()
        {
            InitializeComponent();
            dgAlgoritmos.ItemsSource = Fachada.ListarAlgoritmos();
        }

        public UcListarAlgoritmo(List<Algoritmo> algoritmos)
        {
            InitializeComponent();
            dgAlgoritmos.ItemsSource = algoritmos;
        }

        private IFachada _fachada;
        public IFachada Fachada
        {
            get
            {
                if (_fachada == null)
                {
                    _fachada = new Fachada.Fachada();
                }
                return _fachada;
            }
        }
    }
}
